package com.ysd.ziyuanshiyongtongji.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;

import org.hibernate.annotations.CreationTimestamp;
import org.springframework.format.annotation.DateTimeFormat;

import lombok.Data;

/**
 * Member
 */
@Data
@Entity
@Table
public class Member {
    @Id
    @GeneratedValue
  private Integer id;//主键
@Column(unique = true)
 private String cardNo;//会员卡号，当前时间
  private String name;//姓名
  private String sex;//性别
  private String category;//身份，0表示学生，1表示老师
   @Column(length = 18,unique = true)
  private String card;//身份证号，唯一，确保一个用户只有一个会员卡
  private String department;//系
  private String profession;//专业
  private String grade;//年级
  private String phone;//电话
  @DateTimeFormat(pattern="yyyy-MM-dd")
  @JsonFormat(pattern="yyyy-MM-dd")
  @CreationTimestamp//自动生成系统时间，格式为yyyy-MM-dd hh:MM:ss
  private Date regdate;//入会时间
  @Column(insertable = false,columnDefinition = "int default 0")
  private Integer status;//状态，0表示没有使用资源
  private String remark;//备注
    
}